<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>08_表格选择</title>
    <style>
        table,
        table tr th,
        table tr td {
            border: 1px solid #0094ff;
        }
    </style>
</head>

<body>

    <table id="data">
        <thead>
            <tr>
                <th>测试</th>
                <th>测试</th>
                <th>测试</th>
                <th>测试</th>
                <th>测试</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
            </tr>
            <tr>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
            </tr>
            <tr>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
            </tr>
            <tr>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
            </tr>
            <tr>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
            </tr>
            <tr>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
                <td>变色</td>
            </tr>
        </tbody>
    </table>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript">
        $('#data>tbody>tr:odd').css('background', 'yellow')
    </script>
</body>

</html>